package kuoge.practice.kafka.stream.member.clickrate;

import java.util.concurrent.TimeUnit;

/**
 * @Description
 */
public class ClickLauncher {
    public static void main(String[] args) throws InterruptedException {
        final UserClickEventProducer userClickEventProducer = new UserClickEventProducer();
        userClickEventProducer.startSendEvent();

        final UserClickEventConsumer userClickEventConsumer = new UserClickEventConsumer();
        userClickEventConsumer.startClickStreamProcess();
        userClickEventConsumer.startConsumeClickReport();
        System.out.println("start success");

        TimeUnit.SECONDS.sleep(90);

        userClickEventProducer.stopSendEvent();
        userClickEventConsumer.stopClickStreamProcess();
        userClickEventConsumer.stopConsumeClickReport();
        System.out.println("stop success");
    }
}
